<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<s:errors/>
<table>
    <sec:authorize access="hasRole('ROLE_USER')">
        <tr>
            <th><s:label for="b1" name="badge.trainer"><f:message key="badge.table.trainer"/></s:label></th>
            <td>
                <s:select name="badge.trainer.id"> 
                    <s:options-collection collection="${actionBean.allTrainersWithoutCurrent}" value="id" label="fullName"/>
                </s:select>
            </td>
        </tr>
        <tr>
            <th><s:label for="b2" name="badge.stadium"><f:message key="badge.table.myStadium"/></s:label></th>
            <td>
                <s:select name="badge.stadium.id"> 
                    <s:options-collection collection="${actionBean.myStadium}" value="id" label="town"/>
                </s:select>
            </td>
        </tr>
    </sec:authorize>
    <sec:authorize access="hasRole('ROLE_ADMIN')">
        <tr>
            <th><s:label for="b1" name="badge.trainer"><f:message key="badge.table.trainer"/></s:label></th>
            <td>
                <s:select name="badge.trainer.id"> 
                    <s:options-collection collection="${actionBean.allTrainers}" value="id" label="fullName"/>
                </s:select>
            </td>
        </tr>
        <tr>
            <th><s:label for="b2" name="badge.stadium"><f:message key="badge.table.stadium"/></s:label></th>
            <td>
                <s:select name="badge.stadium.id"> 
                    <s:options-collection collection="${actionBean.allStadiums}" value="id" label="town"/>
                </s:select>
            </td>
        </tr>
    </sec:authorize>
</table>
